package com.itheima03;

import java.util.LinkedList;

/**
 * @author Xiao
 * @date 2021/7/17
 */
public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList<String> list = new LinkedList<>();
        list.add("Hello");
        list.add("World");
        list.add("Java");
        list.addFirst("Hey");
        list.addLast("JavaEE");
        System.out.println(list);
        System.out.println(list.getFirst());
        System.out.println(list.getLast());
        System.out.println(list.removeFirst());
        System.out.println(list.removeLast());
        System.out.println(list);
    }
}
